//*********************************************************
//
//    Copyright (c) Microsoft. All rights reserved.
//    This code is licensed under the Apache License, Version 2.0.
//    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
//    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
//    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
//    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************

using System;
using System.Collections.Generic;
using System.Text;

namespace Microsoft.Research.eResearch
{
    /// <summary>
    /// Interface that describes an object in the backend and
    /// provides basic services
    /// </summary>
    public interface IObject
    {
        /// <summary>
        /// ID of the object
        /// </summary>
        Guid ID { get; }

        /// <summary>
        /// Type of the object
        /// </summary>
        /// <seealso cref="Connection.Storage"/>
        Connection.Storage ObjType { get; }

        /// <summary>
        /// Fetches a fresh copy of the object from the data storage
        /// </summary>
        void Refresh();

        /// <summary>
        /// Saves the object to the data backend
        /// </summary>
        void Save();

        /// <summary>
        /// Deletes the object from the data backend
        /// </summary>
        void Delete();
    }
}
